<?php

namespace App\Http\Controllers\API;

use App\Models\DownloadZone;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class DownloadZoneController extends Controller
{
    public function index(Request $request)
    {
        $download_zone = DownloadZone::query()->where('status', 1)->get()->toArray();
        $data = [];
        foreach ($download_zone as $item) {
            $avatar_url = config('app.url');
            $path =  'https://cdn.gongyingdao.com/' . $item['files'];
//            $item['title'] = $item[title;
            $item['files'] = $path;
            $data[] = $item;
        }

        return $this->success($data);
    }


}
